More accurate fix for GtkTreeMenu regression.
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 18 Jan 2011 15:41:35 +0000 (00:41 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Tue, 18 Jan 2011 15:43:08 +0000 (00:43 +0900)
The previous fix rebuilds the root menu unconditionally,
this one only rebuilds the root menu if the root path
has indeed changed.

https://bugzilla.gnome.org/show_bug.cgi?id=639792

gtk/gtktreemenu.c

index a2f1290ca7c33cf5dd6ad651764ceff9b54dd7ab..25a01411203baf5edb32d32e5dcb460ed1528538 100644 (file)
@@ -961,7 +961,7 @@ row_reordered_cb (GtkTreeModel    *model,
   GtkTreeMenuPrivate *priv = menu->priv;
   gboolean            this_menu = FALSE;
 
-  if (path == NULL || priv->root == NULL)
+  if (gtk_tree_path_get_depth (path) == 0 && !priv->root)
     this_menu = TRUE;
   else if (priv->root)
     {